package cn.spream.common.web;

import java.util.Arrays;

/**
 * 国际化消息
 * Created with IntelliJ IDEA.
 * User: shaojiaxin
 * Date: 13-8-18
 * Time: 上午9:47
 * To change this template use File | Settings | File Templates.
 */
public class Message {

    private String key;
    private String code;
    private String params[] = {};

    public Message(String key, String code, String[] params) {
        this.key = key;
        this.code = code;
        this.params = params;
    }

    public Message(String key, String code) {
        this.key = key;
        this.code = code;
    }

    public Message(String code, String[] params) {
        this.code = code;
        this.params = params;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String[] getParams() {
        return params;
    }

    public void setParams(String[] params) {
        this.params = params;
    }

    @Override
    public String toString() {
        return "Message{" +
                "key='" + key + '\'' +
                ", code='" + code + '\'' +
                ", params=" + Arrays.toString(params) +
                '}';
    }
}
